/**
 * @filename:SwitchOrderListNotifyDao 2020年07月01日
 * @project hotel-admin  V1.0
 * Copyright(c) 2020 Zhang·JZ Co. Ltd.
 * All right reserved.
 */
package hotel.switchs.oversea.online.mapper;

import hotel.base.oversea.repository.MyMapper;
import hotel.switchs.oversea.api.entity.order.SwitchOrderListNotify;
import org.apache.ibatis.annotations.Param;

import java.util.Map;


/**
 * @Description:TODO(携程订单变更表-实时
根据携程接口获取对应订单信息变更数据存储
参考getdltordernot数据访问层)
 *
 * @version: V1.0
 * @author: Zhang·JZ
 *
 */
public interface SwitchOrderListNotifyMapper extends MyMapper<SwitchOrderListNotify> {

    /**
     * 根据md5key 删除对应数据
     * @param md5Key
     * @return
     */
    SwitchOrderListNotify findSwitchOrderListNotifyByMd5Key(@Param("md5Key") String md5Key);

    SwitchOrderListNotify queryOneNotDealByNotifyOrderId();

    int updateNotifyOrderIsDeal(Map map);


    /**
    *@Description: 根据orderId 查找订单状态为0的数据，进行携程接口操作
    *@Param: orderId"
    *@return: SwitchOrderListNotify
    *@Author: Zhang·jz
    *@date: 2020/8/1
    */
    SwitchOrderListNotify findSwitchOrderListNotifyByOrderId(@Param("orderId") String orderId);


    /**
     * 统计订单通知表
     * @param  map  {orderId 订单号,formType 类型,orderStatus 状态}
     * @return
     */
    int countNotifyOrderByOrderIdStateType(Map map);

    /**
    *@Description: 根据主键修改当前状态
    *@Author: Zhang·jz
    *@date: 2020/9/15
    */
    int updateNotifyOrderIsDealById(Map map);

}
